<template>
  <div class="app">
      <h3 ref="test">我是App组件</h3>
      <h4>{{msg}}</h4>
      <button @click="showMore">点击提示内容</button>
      <School ref="xuexiao"/>
  </div>
</template>

<script>
  import School from './components/School'
  export default {
    name:'App',
    components:{School},
    data(){
        return {
            msg:'欢迎来这里~~'
        }
    },
    methods: {
        showMore(){
            console.log(this.$refs.test.innerText);
            console.log(this.$refs.xuexiao);
            console.log('---',this.$refs.xuexiao.city);
        }
    },
  }
</script>

<style>
  .app{
      background-color: rgb(222, 166, 233);
      padding: 30px;
  }
</style>